/**
 * 
 */
package name.webdizz.gadget.four.envelope.client.domain;

/**
 * This class represent {@link Envelope} size of the current week.
 * 
 * @author Izzet_Mustafayev
 * 
 */
public class EnvelopeSize {

	/**
	 * Total {@link Envelope} size.
	 */
	private Float total;
	
	/**
	 * Spent amount.
	 */
	private Float spent;

	public EnvelopeSize() {
		total = 0.0F;
		spent = 0.0F;
	}

	/**
	 * @return the total
	 */
	public Float getTotal() {
		return total;
	}

	/**
	 * @param total
	 *            the total to set
	 */
	public void setTotal(Float total) {
		this.total = total;
	}

	/**
	 * @return the spent
	 */
	public Float getSpent() {
		return spent;
	}

	/**
	 * @param spent
	 *            the spent to set
	 */
	public void setSpent(Float spent) {
		this.spent = spent;
	}

	/**
	 * @return the remain
	 */
	public Float getRemain() {
		return total - spent;
	}

	/**
	 * Make all null.
	 */
	public void nulling() {
		spent = 0.0F;
	}

	/**
	 * Increase {@link Envelope} spent amount.
	 * 
	 * @param amount
	 *            the spent amount
	 */
	public void increaseSpent(final Float amount) {
		spent += amount;
	}

}
